<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h:html xmlns="http://www.w3.org/1999/xhtml"
	    xmlns:ui="http://java.sun.com/jsf/facelets"
	  	xmlns:h="http://java.sun.com/jsf/html"
	  	xmlns:f="http://java.sun.com/jsf/core"
	  	xmlns:s="http://jboss.org/schema/seam/taglib">
<h:head>
<title>Guess a number...</title>
</h:head>
<h:body>
<h1>Guess a number...</h1>
	<h:form id="NumberGuessMain">
	    <h:outputText value="Higher!" rendered="#{randomNumber gt guess.value}" />
	    <h:outputText value="Lower!" rendered="#{randomNumber lt guess.value}" />
		<br />
        I'm thinking of a number between <h:outputText id="Smallest" value="#{game.smallest}" /> and 
        <h:outputText id="Biggest" value="#{game.biggest}" />.
        <br />
        Your guess: 
        <h:inputText value="#{guess.value}" id="inputGuess" required="true">
            <f:validateLongRange
                maximum="#{game.biggest}" 
                minimum="#{game.smallest}"/>
        </h:inputText>
		<h:commandButton id="GuessButton" type="submit" value="Guess" action="guess">
			<!-- Workaround for JBSEAM-4976 -->
            <s:conversationId/>
        </h:commandButton>
		<br/>
        <h:message for="inputGuess" style="color: red"/>
	</h:form>
</h:body>
</h:html>
